package cn.gd.service.Administrative;

import cn.gd.mapper.Administrative.AdministrativeMapper;
import cn.gd.pojo.Meetingrooms;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author wyh
 * @version 1.80
 */
@Service
public class AdministrativeServiceImpl implements AdministrativeService {
    @Autowired
    private AdministrativeMapper administrativeMapper;

    @Override
    public PageInfo<Meetingrooms> getMeetingRoomsAll(Integer pageNo,
                                                     Integer pageSize) {
        PageHelper.startPage(pageNo, pageSize);
        return new PageInfo<>(administrativeMapper.getMeetingRoomsAll());
    }

    @Override
    public Meetingrooms getMeetingRoomsId(Integer id) {
        return administrativeMapper.getMeetingRoomsId(id);
    }

    @Override
    public int updateMeetingRooms(Meetingrooms meetingrooms) {
        return administrativeMapper.updateMeetingRooms(meetingrooms);
    }

    @Override
    public int deleteMeetingRooms(Integer id) {
        return administrativeMapper.deleteMeetingRooms(id);
    }

    @Override
    public int addMeetingRooms(Meetingrooms meetingrooms) {
        return administrativeMapper.addMeetingRooms(meetingrooms);
    }
}
